home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- LIBQ(FILES) LIBQ(FILES)
-
-
-
- NAME
- libq - Equel run-time support library
-
- DESCRIPTION
- _L_i_b_q all the routines necessary for an equel program to
- load. It typically resides in /_u_s_r/_l_i_b/_l_i_b_q._a, and must be
- specified when loading equel pre-processed object code. It
- may be referenced on the command line of _c_c by the abbrevia-
- tion -_l_q.
-
- Several useful routines which are used by equel processes
- are included in the library. These may be employed by the
- equel programmer to avoid code duplication. They are:
-
- int IIatoi(buf, i)
- char *buf;
- int i;
-
- char *IIbmove(source, destination, len)
- char *source, *destination;
- int len;
-
- char *IIconcatv(buf, arg1, arg2, ..., 0)
- char *buf, *arg1, ...;
-
- char *IIitos(i)
- int i;
-
- int IIsequal(s1, s2)
- char *s1, *s2;
-
- int IIlength(string)
- char *string;
-
- IIsyserr(string, arg1, arg2, ...);
- char *string;
-
-
- IIatoi IIatoi is equivalent to atoi(UTIL).
-
- IIbmove Moves _l_e_n bytes from _s_o_u_r_c_e to _d_e_s_t_i_n_a_t_i_o_n, re-
- turning a pointer to the location after the last
- byte moved. Does not append a null byte.
-
- IIconcatv Concatenates into _b_u_f all of its arguments, re-
- turning a pointer to the null byte at the end of
- the concatenation. _B_u_f may not be equal to any
- of the arg-n but arg1.
-
- IIitos IIitos is equivalent to itoa(III).
-
- IIsequal Returns 1 iff strings s1 is identical to s2.
-
- IIlength Returns max(length of _s_t_r_i_n_g without null byte
- at end, 255)
-
- IIsyserr IIsyserr is diferrent from syserr(util) only in
- that it will print the name in IIproc_name, and
- in that there is no 0 mode. Also, it will al-
- ways call exit(-1) after printing the error mes-
- sage.
-
- There are also some global Equel variables which may be
- manipulated by the user:
-
- int IIerrflag;
- char *IImainpr;
- char (*IIprint_err)();
- int IIret_err();
- int IIno_err();
-
-
- IIerrflag Set on an error from INGRES to be the error
- number (see the error message section of the
- ``INGRES Reference Manual'') that ocurred. This
- remains valid from the time the error occurrs to
- the time when the next equel statement is is-
- sued. This may be used just after an equel
- statement to see if it succeded.
-
- IImainpr This is a string which determines which ingres
- to call when a "## ingres" is issued. Initially
- it is "/usr/bin/ingres".
-
- IIprint_err This function pointer is used to call a function
- which determines what (if any) error message
- should be printed when an ingres error occurs.
- It is called from IIerror() with the error
- number as an argument, and the error message
- corresponding to the error number returned will
- be printed. If (*IIprint_err)(<_e_r_r_n_o>) returns
- 0, then no error message will be printed. Ini-
- tially IIprint_err is set to IIret_err() to
- print the error that ocurred.
-
- IIret_err Returns its single integer argument. Used to
- have (*IIprint_err)() cause printing of the er-
- ror that ocurred.
-
- IIno_err Returns 0. Used to have (*IIprint_err)()
- suppress error message printing. IIno_err is
- used when an error in a parametrized equel sta-
- temenr occurs to suppress printing of the
- corresponding parser error.
-
- SEE ALSO
- atoi(util), bmove(util), cc(1), equel(unix), exit(2),
- itoa(3), length(util), sequal(util), syserr(util)
-
-